<template>
  <div class="noticeDetail">
    <p class="notice_tit">{{info.title}}</p>
    <div class="notice_cont" v-html="info.content"></div>
  </div>
</template>


<script>
import axios from 'axios'
import global from '../../../utils/global'
import store from '../../../utils/store'
export default {
  name: 'noticeDetail',
  data () {
    return {
      info: {},
    }
  },
  mounted(){
    // console.log("____________________________________");
    // console.log(this.$route.params.id);
    this.getInfo();
    this.$root.washShare();
  },
  methods: {
    getInfo(){
      var that = this;
      axios.get(global.api.index.noticeDetail,{
        params: {
          uuid: localStorage.getItem('carWashUuid'),
          id: this.$route.params.id,
        }
      })
      .then(function(res){
        console.log("getInfo then");
        console.log(res);
        if (res.data.code == 0) {
          that.info = res.data.data[0]
        }
      })
      .catch(function(res){
        console.log("getInfo catch");
        console.log(res);
      }) 
    },
    toNotice(id){
      this.$router.push({
        name:'washNoticeDetail',
        params: {
          id: id,
        }
      })
    }
  }
}
</script>

<style scoped>
  .noticeList{

  }
  .noticeList ul{

  }
  .noticeList li{
    text-align: left;
    border-bottom: 1px solid #B3B3B4;
    padding: 1rem 0.5rem 1rem 2rem;
  }
  .notice_tit{
    padding-bottom: 0.3rem;
  }
  .notice_time{
    font-size: 0.85rem;
    color: #888888;
  }
</style>
<style>
  ul,li,div,a,p,span{
    margin: 0;
    padding: 0;
  }
  li{
    list-style: none;
  }
  .flex{
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
  }
</style>
